home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-03-07 | 1.3 KB | 48 lines | [TEXT/MWII] |
- // UGraph.h
- // Copyright © 1990 Apple Computer, Inc. All rights reserved.
-
- #ifndef __UGRAPH__
- #define __UGRAPH__
-
- // • Auto-Include the requirements for this unit's interface.
- #ifndef __UMacApp__
- #include "UMacApp.h"
- #endif
-
- #include "Graph.h"
-
- /* the interface to this class goes here */
-
- class TGraph : public TView {
- public:
- virtual pascal void IRes(TDocument *itsDocument, TView *itsSuperView, Ptr *itsParams);
- // Initialize the graph view from its resource template.
-
- virtual pascal void SetGraphRect(Rect graphRect);
- // Initializes the graph data structure to be the size of this view
-
- virtual pascal void SetPoint( short which, long value );
- // set a point to a value
-
- virtual pascal short GetNumPoints();
- // return the number of points in the graph
-
- virtual pascal void ComputeBars(Boolean redraw);
- // the graph library computes each of the bars for this graph
- // and if redraw is TRUE forces the view to redraw itself
-
- virtual pascal void GetCoordinateRange(Rect *coordRange);
- // return min & max Y coordinates, and min & max X coordinates,
- // useful for labeling the axes of the graph
-
- virtual pascal void Draw(Rect *area);
- // draws the graph
-
- virtual pascal void Free(void);
- // frees the data allocated by this class
-
- private:
- GraphStructPtr fData;
- };
-
- #endif